{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}	

<script language="JavaScript" type="text/javascript">
{literal}
function onWarningChange()
{
	var war_id = document.getElementById("warning_id").value;
	var area_list = document.form1.getElementsByTagName('textarea');
{/literal}
  {foreach key=key item=item from=$warnings}
{literal}
    if ( {/literal}{$key}{literal} == war_id )
    area_list[0].value = '{/literal}{$warnings_txt.$key}{literal}';
{/literal}    
  {/foreach}
{literal}
	
}
{/literal}
</script>

<form method="POST" name="form1">
	{$html->form->param('option','com_agora')}
	{$html->form->param('task','users')}
	{$html->form->param('action','save_warning')}
	{$html->form->param('type','clean')}

	{$html->form->param('form[user_id]',$user_id)}
	<fieldset>
		<legend>##Add warning##</legend>
		<table class="admintable">
			<tbody>
				{adminform->select var='warning_id' id='warning_id' keys=$warnings caption='Warning to apply' onChange="onWarningChange();"}
				{adminform->textarea var='message' value=$warnings_txt.$def_id caption='Append message'}
			</tbody>
		</table>
		<div class="width-100" align="center">
			<input type="submit" name="save" value="##Save##"/>
			<input type="button" value="##Cancel##" onclick="window.parent.document.getElementById('sbox-window').close();"/>
		</div>
	</fieldset>

</form>